\hypertarget{modelos_8cpp_source}{\section{modelos.\-cpp}
}

\begin{DoxyCode}
00001 
00009 \textcolor{preprocessor}{#include "\hyperlink{modelos_8hpp}{modelos.hpp}"}
00010 
\hypertarget{modelos_8cpp_source_l00011}{}\hyperlink{modelos_8hpp_a5916c7774f3fbe4e15b58ff1bf9bb60e}{00011} \hyperlink{classvetor}{vetor} \hyperlink{modelos_8cpp_a5916c7774f3fbe4e15b58ff1bf9bb60e}{RCSJJ}(\textcolor{keywordtype}{double} T, \hyperlink{classvetor}{vetor} X, \textcolor{keywordtype}{double} PV)
00012 \{
00016     \hyperlink{classvetor}{vetor} xp(2,\textcolor{charliteral}{'c'});
00017 
00018     \textcolor{keywordtype}{double} inc = 0.1; \textcolor{comment}{// Incerteza dos parâmetros}
00019     \textcolor{keywordtype}{double} b, a1, a2, a3; \textcolor{comment}{// Constantes do sistema}
00020     b  = 1.0*(1 + \hyperlink{funcoes_8cpp_acdba77a1b686ff7d77d9b09e5f13fccb}{Rand}(-inc, inc)); \textcolor{comment}{// Valor nominal mais uma incerteza entre
       (-var,var)}
00021     a1 = 1.0*(1 + \hyperlink{funcoes_8cpp_acdba77a1b686ff7d77d9b09e5f13fccb}{Rand}(-inc, inc));
00022     a2 = 1.0*(1 + \hyperlink{funcoes_8cpp_acdba77a1b686ff7d77d9b09e5f13fccb}{Rand}(-inc, inc));
00023     a3 = 0.5; \textcolor{comment}{// frequencia de excitação, \(\backslash\)f$ \(\backslash\)omega \(\backslash\)f$}
00024 
00025     \textcolor{keywordtype}{double} u = PV + 1.6*sin(T*a3); \textcolor{comment}{// Entrada do sistema}
00026 
00027     xp(0) = X(1); \textcolor{comment}{// Sistema escrito com variáveis de estado}
00028     xp(1) = b*u - a1*sin(X(0)) - a2*X(1);
00029 
00030     \textcolor{keywordflow}{return} xp;
00031 \}
00032 
\hypertarget{modelos_8cpp_source_l00033}{}\hyperlink{modelos_8hpp_abd69f1520cb14c6600719210bcbca9b1}{00033} \hyperlink{classvetor}{vetor} \hyperlink{modelos_8cpp_abd69f1520cb14c6600719210bcbca9b1}{ROV}(\textcolor{keywordtype}{double} T, \hyperlink{classvetor}{vetor} X, \textcolor{keywordtype}{double} PV)
00034 \{
00035     \textcolor{keywordtype}{double} inc = 0.25; \textcolor{comment}{// Incerteza dos parâmetros}
00036     \textcolor{keywordtype}{double} m, C, A, rho; \textcolor{comment}{// Constantes do sistema}
00037     m = 50.0*(1 + \hyperlink{funcoes_8cpp_acdba77a1b686ff7d77d9b09e5f13fccb}{Rand}(-inc, inc)); \textcolor{comment}{// Valor nominal mais uma incerteza entre
       (-var,var)}
00038     C = 2.0*(1 + \hyperlink{funcoes_8cpp_acdba77a1b686ff7d77d9b09e5f13fccb}{Rand}(-inc, inc));
00039     A = 0.25;
00040     rho = 1000.0;
00041 
00042     \hyperlink{classvetor}{vetor} xp(2,\textcolor{charliteral}{'c'});
00043 
00044     xp(0) = X(1); \textcolor{comment}{// Sistema escrito com variáveis de estado}
00045     xp(1) = (PV - 0.5*rho*C*A*X(1)*fabs(X(1)))/m;
00046 
00047     \textcolor{keywordflow}{return} xp;
00048 \}
00049 
\hypertarget{modelos_8cpp_source_l00050}{}\hyperlink{modelos_8hpp_aca28d029be3e9cb7573b613b3d7e979f}{00050} \hyperlink{classvetor}{vetor} \hyperlink{modelos_8cpp_aca28d029be3e9cb7573b613b3d7e979f}{RLD}(\textcolor{keywordtype}{double} T, \hyperlink{classvetor}{vetor} X, \textcolor{keywordtype}{double} PV)
00051 \{
00052     \textcolor{keywordtype}{double} inc = 0.1;
00053     \textcolor{keywordtype}{double} L, E, w, R, E0, Cj, Cd, a, b;
00054     L = 100.0e-6*(1.0 + \hyperlink{funcoes_8cpp_acdba77a1b686ff7d77d9b09e5f13fccb}{Rand}(-inc, inc));
00055     E = PV; \textcolor{comment}{//80.0e-3; //2.0;}
00056     w = 1400.0*M\_PI*1.0e3;
00057     R = 60.0*(1.0 + \hyperlink{funcoes_8cpp_acdba77a1b686ff7d77d9b09e5f13fccb}{Rand}(-inc, inc));
00058     E0 = 0.1*(1.0 + \hyperlink{funcoes_8cpp_acdba77a1b686ff7d77d9b09e5f13fccb}{Rand}(-inc, inc));
00059     Cj = 400.0e-12*(1.0 + \hyperlink{funcoes_8cpp_acdba77a1b686ff7d77d9b09e5f13fccb}{Rand}(-inc, inc));
00060     Cd = 0.1e-6*(1.0 + \hyperlink{funcoes_8cpp_acdba77a1b686ff7d77d9b09e5f13fccb}{Rand}(-inc, inc));
00061     a = (Cj - Cd)/(2*Cd*Cj);
00062     b = (Cj + Cd)/(2*Cd*Cj);
00063 
00064     \hyperlink{classvetor}{vetor} xp(2,\textcolor{charliteral}{'c'});
00065 
00066     xp(0) = X(1);
00067     xp(1) = (E*sin(w*T) - R*X(1) - a*fabs(X(0)) - b*X(0) - E0)/L;
00068 
00069     \textcolor{keywordflow}{return} xp;
00070 \}
00071 
\hypertarget{modelos_8cpp_source_l00072}{}\hyperlink{modelos_8hpp_a3b57d7a9abb9f330d263ad62756cd863}{00072} \hyperlink{classvetor}{vetor} \hyperlink{modelos_8cpp_a3b57d7a9abb9f330d263ad62756cd863}{VdP}(\textcolor{keywordtype}{double} T, \hyperlink{classvetor}{vetor} X, \textcolor{keywordtype}{double} PV)
00073 \{
00074     \textcolor{keywordtype}{double} inc = 0.1;
00075     \textcolor{keywordtype}{double} mu, A, B, C, f;
00076     mu = 1.0*(1.0 + \hyperlink{funcoes_8cpp_acdba77a1b686ff7d77d9b09e5f13fccb}{Rand}(-inc, inc));
00077     A = 1.0*(1.0 + \hyperlink{funcoes_8cpp_acdba77a1b686ff7d77d9b09e5f13fccb}{Rand}(-inc, inc));
00078     B = 1.0*(1.0 + \hyperlink{funcoes_8cpp_acdba77a1b686ff7d77d9b09e5f13fccb}{Rand}(-inc, inc));
00079     C = 0.0*(1.0 + \hyperlink{funcoes_8cpp_acdba77a1b686ff7d77d9b09e5f13fccb}{Rand}(-inc, inc));
00080     f = PV;
00081 
00082     \hyperlink{classvetor}{vetor} xp(2,\textcolor{charliteral}{'c'});
00083 
00084     xp(0) = X(1);
00085     xp(1) = mu*(1.0 - A*X(0)*X(0))*X(1) - B*X(0) - C + f;
00086 
00087     \textcolor{keywordflow}{return} xp;
00088 \}
00089 
\hypertarget{modelos_8cpp_source_l00090}{}\hyperlink{modelos_8hpp_a9dda63f7ab60b62014d374df03262632}{00090} \hyperlink{classvetor}{vetor} \hyperlink{modelos_8cpp_a9dda63f7ab60b62014d374df03262632}{RCSJJest}(\textcolor{keywordtype}{double} T, \hyperlink{classvetor}{vetor} X, \textcolor{keywordtype}{double} PV)
00091 \{
00092     \textcolor{keywordtype}{double} b, a1, a2, a3;
00093     b  = 1.0; \textcolor{comment}{// Valor nominal das constantes}
00094     a1 = 1.0;
00095     a2 = 1.0;
00096     a3 = 0.5; \textcolor{comment}{// Frequencia de excitação, \(\backslash\)f$ \(\backslash\)omega \(\backslash\)f$}
00097 
00098     \textcolor{keywordtype}{double} u = PV + 1.6*sin(T*a3); \textcolor{comment}{// Entrada do sistema}
00099 
00100     \hyperlink{classvetor}{vetor} xp(2,\textcolor{charliteral}{'c'});
00101 
00102     xp(0) = X(1);
00103     xp(1) = b*u - a1*sin(X(0)) - a2*X(1);
00104 
00105     \textcolor{keywordflow}{return} xp;
00106 \}
00107 
\hypertarget{modelos_8cpp_source_l00108}{}\hyperlink{modelos_8hpp_a49f996ffdb7eba4b435f2d28035cb493}{00108} \hyperlink{classvetor}{vetor} \hyperlink{modelos_8cpp_a49f996ffdb7eba4b435f2d28035cb493}{RLDest}(\textcolor{keywordtype}{double} T, \hyperlink{classvetor}{vetor} X, \textcolor{keywordtype}{double} PV)
00109 \{
00110     \textcolor{keywordtype}{double} L, E, w, R, E0, Cj, Cd, a, b;
00111     L = 100.0e-6;
00112     E = PV; \textcolor{comment}{//80.0e-3; //2.0;}
00113     w = 1400.0*M\_PI*1.0e3;
00114     R = 60.0;
00115     E0 = 0.1;
00116     Cj = 400.0e-12;
00117     Cd = 0.1e-6;
00118     a = (Cj - Cd)/(2*Cd*Cj);
00119     b = (Cj + Cd)/(2*Cd*Cj);
00120 
00121     \hyperlink{classvetor}{vetor} xp(2,\textcolor{charliteral}{'c'});
00122 
00123     xp(0) = X(1);
00124     xp(1) = (E*sin(w*T) - R*X(1) - a*fabs(X(0)) - b*X(0) - E0)/L;
00125 
00126     \textcolor{keywordflow}{return} xp;
00127 \}
00128 
\hypertarget{modelos_8cpp_source_l00129}{}\hyperlink{modelos_8hpp_a4389b6c8e656cbfd35cca3a4f27fcd92}{00129} \hyperlink{classvetor}{vetor} \hyperlink{modelos_8cpp_a4389b6c8e656cbfd35cca3a4f27fcd92}{VdPest}(\textcolor{keywordtype}{double} T, \hyperlink{classvetor}{vetor} X, \textcolor{keywordtype}{double} PV)
00130 \{
00131     \textcolor{keywordtype}{double} mu, A, B, C, f;
00132     mu = 1.0;
00133     A = 1.0;
00134     B = 1.0;
00135     C = 0.0;
00136     f = PV;
00137 
00138     \hyperlink{classvetor}{vetor} xp(2,\textcolor{charliteral}{'c'});
00139 
00140     xp(0) = X(1);
00141     xp(1) = mu*(1.0 - A*X(0)*X(0))*X(1) - B*X(0) - C + f;
00142 
00143     \textcolor{keywordflow}{return} xp;
00144 \}
\end{DoxyCode}
